package com.xyhua.validator.service;

import com.xyhua.validator.ValidationUtils;
import com.xyhua.validator.entity.UserEntity;

import org.springframework.stereotype.Service;

@Service("userService")
public class UserServiceImpl implements UserService {
 
	public String saveUser(UserEntity user) {
		
		// 调用hibernate-validator数据校验
		ValidationUtils.validateEntity(user);
		
		// 调用dao保存用户信息
		return "success";
	}
}